/***
 * @description axios封装
 * @file api.ts
 * @author andy
 * @date 2024/3/22 16:40
 */
// file:api.s
// 1、导入axios以及拦截器
import service from "./request";

// demo接口1
export const demo1 = (data: any) => {
  return service({
    url: "/user/user/demo1/" + data,
    method: "post",
  });
};

// demo接口2
export const demo2 = (data: any) => {
  return service({
    url: "/user/user/demo2",
    method: "post",
    data,
  });
};

// 发送短信
export const sendCode = (mobile: any) => {
  return service({
    url: "/user/user/sendCode/" + mobile,
    method: "post",
  });
};

// 用户注册
export const userReg = (data: any) => {
  return service({
    url: "/user/user/userReg",
    method: "post",
    data,
  });
};

// 用户登录
export const userLogin = (data: any) => {
  return service({
    url: "/user/user/userLogin",
    method: "post",
    data,
  });
};

//动态菜单
export const getMenuTree = () => {
  return service({
    url: "/user/user/getMenuTree",
    method: "post",
  });
};

// 商家用户
export const getShopUser = (data: any) => {
  return service({
    url: "/user/user/getShopUser",
    method: "post",
    data,
  });
};
